package com.fqgj.sentry.biz.antiFraud.domain;

/**
 * Created by liupengpeng on 2017/10/16.
 */
public enum PropertyTypeEnums {
    ip("ip", "ip地址", "#FF7F50"),
    wifi("wifi", "wifi", "#FF1493"),
    email("email", "email", "#EEB422"),
    device("client_id", "device", "#CD853F"),
    qq("qq", "qq", "#B3EE3A"),
    identityNO("identity_no", "身份证", "#EE3B3B"),
    companyName("company_name", "单位名称", "#7EC0EE"),
    companyPhone("company_phone", "公司电话", "#6959CD"),
    contactMobile1("contact_mobile_1", "联系人1", "#00FF7F"),
    contactMobile2("contact_mobile_2", "联系人2", "#00FFFF");


    private String type;
    private String desc;
    private String lineColor;


    public String getType() {
        return type;
    }

    public PropertyTypeEnums setType(String type) {
        this.type = type;
        return this;
    }

    public String getDesc() {
        return desc;
    }

    public PropertyTypeEnums setDesc(String desc) {
        this.desc = desc;
        return this;
    }

    public String getLineColor() {
        return lineColor;
    }

    public PropertyTypeEnums setLineColor(String lineColor) {
        this.lineColor = lineColor;
        return this;
    }

    PropertyTypeEnums(String type, String desc, String lineColor) {
        this.type = type;
        this.desc = desc;
        this.lineColor = lineColor;
    }

    public static PropertyTypeEnums getEnumByType(String type) {
        PropertyTypeEnums propertyTypeEnums = null;
        for (PropertyTypeEnums e : PropertyTypeEnums.values()) {
            if (e.getType().equals(type)) {
                return e;
            }
        }
        return propertyTypeEnums;
    }

}
